package nix.spring.tx.service;

import nix.spring.tx.dao.AccountDao;

public class Account2ServiceImpl implements AccountService {

	private AccountDao accountDao;

	public void setAccountDao(AccountDao accountDao) {
		this.accountDao = accountDao;
	}

	@Override
	public void transfer(Integer from, Integer to, Double money) {

		accountDao.subMoney(from, money);
		int i = 1 / 0;
		accountDao.addMoney(to, money);
	}

}
